<?php
define('IN_TG','blog');
define('IN_JS','blog');
define('SCRIPT','blog');
session_start();
require('includes/common.inc.php');
require('header.php');

$sql = "select tg_id,tg_username,tg_sex,tg_face from tg_user where tg_active=1";
$size = $_system['blog'];
_page($sql,$size);
$sql .= " order by tg_username limit $_pagenum,$size";
$res = _query($sql);

?>
<div id="blog">
	<h2>博友列表</h2>
		<?php while($row = _fetch_array_list($res)):?>
		<dl>
			<dd class="user"><?php echo $row['tg_username']?>(<?php echo $row['tg_sex']?>)</dd>
			<dt><img src="<?php echo $row['tg_face']?>" alt="<?php echo $row['tg_username']?>" /></dt>
			<dd class="message"><a href="javascript:;" name="message" title="<?php echo $row['tg_id']?>">发消息</a></dd>
			<dd class="friend"><a href="javascript:;" name="friend" title="<?php echo $row['tg_id']?>">加为好友</a></dd>
			<dd class="guest">写留言</dd>
			<dd class="flower"><a href="javascript:;" name="flower" title="<?php echo $row['tg_id']?>">给他送花</a></dd>
		</dl>
		<?php endwhile;?>
	<div id="page_num"><?php _paging(1);?></div>

</div>
<?php
require('includes/footer.inc.php');
?>
